<template>
  <div>
    <h1>Count</h1>
    <p>count值:{{count}}</p>
    <p>doubleCount值:{{doubleCount}}</p>
    <p>电影列表的长度:{{movieList.length}}</p>
    <button @click="addCount">累加count</button>
    <button @click="addCountN(3)">累加N</button>
    <button @click="addCountNM(3,4)">累加N和M</button>
  </div>
</template>

<script lang="ts">
import {defineComponent} from "vue";
export default defineComponent({
    name:"Count",
})
</script>

<script lang="ts" setup>
import {storeToRefs} from "pinia";
import {useCountStore} from "../store/count/count";
import {useMovieStore} from "../store/movie/movie";
const countStore = useCountStore()
const movieStore = useMovieStore()
const {movieList} = storeToRefs(movieStore)
const {count,doubleCount} = storeToRefs(countStore)
const {addCount,addCountN,addCountNM} = countStore
</script>

<style scoped>
h1{
    background: pink;
}
</style>